﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace Developer.Core.FrameWork.EventBus.Model
{
    /// <summary>
    /// 事件模型
    /// </summary>
    public class EventModel
    {
        public EventModel()
        {
            Id = Guid.NewGuid();
            CreationDate = DateTime.UtcNow;
        }

        [JsonConstructor]
        public EventModel(Guid id, DateTime creationDate)
        {
            this.Id = id;
            this.CreationDate = creationDate;
        }

        [JsonProperty]
        public Guid Id { get; set; }

        [JsonProperty]
        public DateTime CreationDate { get; set; }
    }
}
